﻿@model BeYourMarket.Web.Models.ListingItemModel

<div class="card">
    <div class="card-image">
        <a href="@Url.Action("Listing", "Listing", new { id = Model.ListingCurrent.ID })">
            <img alt="@Model.ListingCurrent.Title" src="@Model.UrlPicture">
            @if (Model.ListingCurrent.Price.HasValue)
            {
                <span class="card-img-label">@Html.DisplayFor(x => Model.ListingCurrent.PriceFormatted)</span>
            }
        </a>
    </div>

    <div class="card-content">
        <a href="@Url.Action("Profile", "Listing", new { id = Model.ListingCurrent.UserID })">
            <img class="thumb-md img-profile-card img-circle" src="@BeYourMarket.Web.Utilities.ImageHelper.GetUserProfileImagePath(Model.ListingCurrent.UserID)" />            
        </a>

        <a href="@Url.Action("Listing", "Listing", new { id = Model.ListingCurrent.ID })">
            <h5 class="card-title">@Model.ListingCurrent.Title</h5>

            <p class="truncate">
                @Html.Raw(Model.ListingCurrent.Description)
            </p>
            <p>
                <span class="score @Model.ListingCurrent.RatingClass text-sm"></span> @Model.ListingCurrent.ListingReviews.Count [[[Reviews]]]
            </p>
        </a>
    </div>
    <div class="card-action">
        <a href="@Url.Action("Listing", "Listing", new { id = Model.ListingCurrent.ID })"><i class="fa fa-map-marker"></i> @Model.ListingCurrent.Location</a>
    </div>
</div>